package com.prs.crm.dao.hr.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.hr.CheckPlanDao;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.hr.CheckPlan;
import com.prs.crm.domain.hr.Leave;
import com.prs.crm.domain.hr.Person;

public class CheckPlanDaoImpl extends BaseDaoImpl<CheckPlan> implements CheckPlanDao{

	@Override
	public List<CheckPlan> getAllCheckPlan() {
		return (List<CheckPlan>)this.getHibernateTemplate().execute(
				new HibernateCallback()
				{
					public Object doInHibernate(Session session) throws HibernateException {
						
				Criteria criteria = session.createCriteria(CheckPlan.class);
				return criteria.list();
					}
			  }
				
		);
	
	}

	@Override
	public CheckPlan getVobject(Serializable id) {
		// TODO Auto-generated method stub
		return this.getHibernateTemplate().get(CheckPlan.class, id);
	}

	@Override
	public Collection<Leave> getLeavesByPersonInMonth(Person person,
			String yearmonth) {
		// TODO Auto-generated method stub
		return null;
	}



	
}
